using UnityEngine;

namespace Game.Component
{
	public class StarData
	{
		public Transform transform;

		public GameObject gameObject;

		public SpriteRenderer sprite;

		public bool appear;

		public float waitTime;

		public float animTime;

		public StarData(Transform trans)
		{
			transform = trans;
			gameObject = trans.gameObject;
			sprite = trans.GetComponent<SpriteRenderer>();
			Init();
		}

		public void Init()
		{
			appear = true;
			sprite.color = new Color(1f, 1f, 1f, 1f);
			waitTime = Random.Range(0f, 20f);
			animTime = 0f;
		}

		public void ResetWaitTime()
		{
			waitTime = Random.Range(2f, 10f);
			animTime = 0f;
		}

		public void ResetAnimTime()
		{
			waitTime = 0f;
			animTime = 1f;
		}
	}
}
